﻿using System;
using UnityEngine;

namespace Yoozoo.Gameplay.Liberty.AI
{

    [Flags]
    public enum CarStatus
    {
        None = 0,
        PathControl = 1,
        
        SpecialPathControl = 2,      // 指定路径控制
        
        PlayerControl = 2048,   // 玩家正在操纵
    }
    
    [Flags]
    public enum CarStyle
    {
        None = 0,
        PathFollow = 1,
        Static = 2,
    }
    
    [Serializable]
    public class CarData
    {
        public int uniqueId;

        public float health = 100;

        public CarStyle carStyle = CarStyle.PathFollow;
        
        public CarStatus carStatus = CarStatus.PathControl;

        public int driveNpcId;
        
        public int pathId;
        public int pathPointIndex;

        public Vector3 destination;

        public bool terminal; // 是否是终点，要减速停下
        
        public Vector3 switchAiModeVector = new Vector3(999,999,999); // 上次切换AI模式相对玩家的向量

        public void Reset()
        {
            uniqueId = 0;
            health = 100;
            pathId = -1;
            pathPointIndex = -1;
            terminal = false;
        }
    }
}